package com.example.fashion.android.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by fashion on 2017/7/14.
 * 实体类共有的部分
 */

public class BaseEntity implements Parcelable{
    private int resultCode;
    private String resultMessage;


    protected BaseEntity(Parcel in) {
        resultCode = in.readInt();
        resultMessage = in.readString();
    }

    public static final Creator<BaseEntity> CREATOR = new Creator<BaseEntity>() {
        @Override
        public BaseEntity createFromParcel(Parcel in) {
            return new BaseEntity(in);
        }

        @Override
        public BaseEntity[] newArray(int size) {
            return new BaseEntity[size];
        }
    };

    public BaseEntity() {

    }

    public int getResultCode() {
        return resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }

    public String getResultMessage() {
        return resultMessage;
    }

    public void setResultMessage(String resultMessage) {
        this.resultMessage = resultMessage;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(resultCode);
        parcel.writeString(resultMessage);
    }

}
